.class public Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;
.super Landroidx/constraintlayout/widget/ConstraintLayout;
.source "VideoToolsView.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;
    }
.end annotation


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/widget/ImageView;

.field private c:Landroid/widget/ImageView;

.field private d:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBarContainer;

.field private e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

.field private f:Lcom/esfile/screen/recorder/media/b;

.field private g:I

.field private h:Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    .line 2
    invoke-direct {p0, p1, p2, v0}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroidx/constraintlayout/widget/ConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 4
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->a:Landroid/content/Context;

    .line 5
    invoke-direct {p0}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->b()V

    return-void
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;)Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->h:Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;

    return-object p0
.end method

.method private b()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->a:Landroid/content/Context;

    sget v1, Les/y4;->durec_merge_video_tools_layout:I

    invoke-static {v0, v1, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    .line 2
    sget v0, Les/x4;->merge_video_close:I

    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->b:Landroid/widget/ImageView;

    .line 3
    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 4
    sget v0, Les/x4;->merge_video_confirm:I

    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->c:Landroid/widget/ImageView;

    .line 5
    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 6
    sget v0, Les/x4;->merge_video_tools_seekbar_container:I

    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBarContainer;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->d:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBarContainer;

    .line 7
    sget v0, Les/x4;->merge_video_tools_seekbar:I

    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    const/4 v1, 0x1

    .line 8
    invoke-virtual {v0, v1}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->setMaskMode(I)V

    .line 9
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    new-instance v1, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$a;

    invoke-direct {v1, p0}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$a;-><init>(Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;)V

    invoke-virtual {v0, v1}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->a(Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar$b;)V

    .line 10
    invoke-virtual {p0}, Landroid/view/ViewGroup;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    sget v1, Les/v4;->durec_trim_snippet_min_side_max_width:I

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I

    move-result v0

    iput v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->g:I

    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    const/16 v0, 0x8

    .line 9
    invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 10
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->h:Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;

    if-eqz v0, :cond_0

    .line 11
    invoke-interface {v0}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;->onDismiss()V

    :cond_0
    return-void
.end method

.method public synthetic a(Landroid/graphics/Bitmap;)V
    .locals 1

    .line 8
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    invoke-virtual {v0, p1}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->a(Landroid/graphics/Bitmap;)V

    return-void
.end method

.method public a(Lcom/esfile/screen/recorder/videos/merge/b0;)V
    .locals 3

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->f:Lcom/esfile/screen/recorder/media/b;

    if-nez v0, :cond_0

    .line 3
    new-instance v0, Lcom/esfile/screen/recorder/media/b;

    invoke-direct {v0}, Lcom/esfile/screen/recorder/media/b;-><init>()V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->f:Lcom/esfile/screen/recorder/media/b;

    .line 4
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/videos/merge/b0;->c()J

    move-result-wide v1

    long-to-int v2, v1

    invoke-virtual {v0, v2}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->setMax(I)V

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/videos/merge/b0;->e()Landroid/util/Pair;

    move-result-object v1

    iget-object v1, v1, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v1, Ljava/lang/Long;

    invoke-virtual {v1}, Ljava/lang/Long;->intValue()I

    move-result v1

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/videos/merge/b0;->e()Landroid/util/Pair;

    move-result-object v2

    iget-object v2, v2, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v2, Ljava/lang/Long;

    invoke-virtual {v2}, Ljava/lang/Long;->intValue()I

    move-result v2

    invoke-virtual {v0, v1, v2}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->a(II)V

    .line 6
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->a()V

    .line 7
    new-instance v0, Lcom/esfile/screen/recorder/videos/merge/ui/g;

    invoke-direct {v0, p0, p1}, Lcom/esfile/screen/recorder/videos/merge/ui/g;-><init>(Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;Lcom/esfile/screen/recorder/videos/merge/b0;)V

    invoke-static {v0}, Les/xc;->a(Ljava/lang/Runnable;)V

    return-void
.end method

.method public synthetic b(Lcom/esfile/screen/recorder/videos/merge/b0;)V
    .locals 7

    .line 11
    :try_start_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->f:Lcom/esfile/screen/recorder/media/b;

    iget v1, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->g:I

    invoke-virtual {v0, v1}, Lcom/esfile/screen/recorder/media/b;->b(I)V

    .line 12
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->f:Lcom/esfile/screen/recorder/media/b;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/videos/merge/b0;->d()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/esfile/screen/recorder/media/b;->a(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    const-wide/16 v0, 0x0

    .line 13
    :goto_0
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/videos/merge/b0;->a()J

    move-result-wide v2

    const-wide/16 v4, 0x3e8

    mul-long v2, v2, v4

    cmp-long v6, v0, v2

    if-gez v6, :cond_0

    .line 14
    iget-object v2, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->f:Lcom/esfile/screen/recorder/media/b;

    const/4 v3, 0x0

    invoke-virtual {v2, v0, v1, v3}, Lcom/esfile/screen/recorder/media/b;->a(JZ)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 15
    new-instance v3, Lcom/esfile/screen/recorder/videos/merge/ui/h;

    invoke-direct {v3, p0, v2}, Lcom/esfile/screen/recorder/videos/merge/ui/h;-><init>(Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;Landroid/graphics/Bitmap;)V

    invoke-static {v3}, Les/xc;->b(Ljava/lang/Runnable;)V

    .line 16
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/videos/merge/b0;->a()J

    move-result-wide v2

    mul-long v2, v2, v4

    const-wide/16 v4, 0xa

    div-long/2addr v2, v4

    add-long/2addr v0, v2

    goto :goto_0

    :cond_0
    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->b:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->a()V

    goto :goto_0

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->c:Landroid/widget/ImageView;

    if-ne p1, v0, :cond_2

    .line 4
    iget-object p1, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->h:Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;

    if-eqz p1, :cond_1

    .line 5
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->getLeftCursorValue()I

    move-result v0

    iget-object v1, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->e:Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/videos/edit/ui/RangeSeekBar;->getRightCursorValue()I

    move-result v1

    invoke-interface {p1, v0, v1}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;->a(II)V

    .line 6
    :cond_1
    invoke-virtual {p0}, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->a()V

    :cond_2
    :goto_0
    return-void
.end method

.method protected onDetachedFromWindow()V
    .locals 1

    .line 1
    invoke-super {p0}, Landroid/view/ViewGroup;->onDetachedFromWindow()V

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->f:Lcom/esfile/screen/recorder/media/b;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/b;->c()V

    :cond_0
    return-void
.end method

.method public setOnVideoToolListener(Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView;->h:Lcom/esfile/screen/recorder/videos/merge/ui/VideoToolsView$b;

    return-void
.end method
